package com.example.threadlocal;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

public class ThreadPoolContextTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ThreadPoolUtil.submit(new RunnableContext(()->{
            System.out.println("Runnable：aaaaaaaaa");
        },"123456"));

        Future<String> future = ThreadPoolUtil.submit(new CallableContext<String>(() -> {
            return "bbbbbbbbbb";
        }, "888888"));

        System.out.println("Callable: " + future.get());
    }
}
